<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621679648200"><span id="local-6989586621679648201"></span></span><span class="hs-pragma">{-# LANGUAGE BangPatterns        #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable  #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE DeriveGeneric       #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-5"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Module      :  Distribution.ModuleName</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Copyright   :  Duncan Coutts 2008</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- License     :  BSD3</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  :  cabal-devel@haskell.org</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Data type for Haskell module names.</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.ModuleName</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-17"></span><span>        </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier">ModuleName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="../../base/src/Data.String.html#fromString"><span class="hs-identifier">fromString</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="Distribution.ModuleName.html#fromComponents"><span class="hs-identifier">fromComponents</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="Distribution.ModuleName.html#components"><span class="hs-identifier">components</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="Distribution.ModuleName.html#toFilePath"><span class="hs-identifier">toFilePath</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="Distribution.ModuleName.html#main"><span class="hs-identifier">main</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Internal</span></span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="Distribution.ModuleName.html#validModuleComponent"><span class="hs-identifier">validModuleComponent</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Parsec.html"><span class="hs-identifier">Distribution.Parsec</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Utils.ShortText.html"><span class="hs-identifier">Distribution.Utils.ShortText</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Utils.ShortText.html#ShortText"><span class="hs-identifier">ShortText</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Utils.ShortText.html#fromShortText"><span class="hs-identifier">fromShortText</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Utils.ShortText.html#toShortText"><span class="hs-identifier">toShortText</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>              </span><span class="hs-special">(</span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#pathSeparator"><span class="hs-identifier">pathSeparator</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Compat.CharParsing.html"><span class="hs-identifier">Distribution.Compat.CharParsing</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">P</span></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html"><span class="hs-identifier">Distribution.Compat.DList</span></a></span><span>       </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">DList</span></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.html#"><span class="hs-identifier">Text.PrettyPrint</span></a></span><span>                </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Disp</span></span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-comment">-- | A valid Haskell module name.</span><span>
</span><span id="line-40"></span><span class="hs-comment">--</span><span>
</span><span id="line-41"></span><span id="local-6989586621679648181"><span id="local-6989586621679648182"></span></span><span class="hs-keyword">newtype</span><span> </span><span id="ModuleName"><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-var">ModuleName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ModuleName"><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-var">ModuleName</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Utils.ShortText.html#ShortText"><span class="hs-identifier hs-type">ShortText</span></a></span><span>
</span><span id="line-42"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679648173"><span id="local-6989586621679648178"><span class="annot"><span class="annottext">ModuleName -&gt; ModuleName -&gt; Bool
(ModuleName -&gt; ModuleName -&gt; Bool)
-&gt; (ModuleName -&gt; ModuleName -&gt; Bool) -&gt; Eq ModuleName
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: ModuleName -&gt; ModuleName -&gt; Bool
$c/= :: ModuleName -&gt; ModuleName -&gt; Bool
== :: ModuleName -&gt; ModuleName -&gt; Bool
$c== :: ModuleName -&gt; ModuleName -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. ModuleName -&gt; Rep ModuleName x)
-&gt; (forall x. Rep ModuleName x -&gt; ModuleName) -&gt; Generic ModuleName
forall x. Rep ModuleName x -&gt; ModuleName
forall x. ModuleName -&gt; Rep ModuleName x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x. Rep ModuleName x -&gt; ModuleName
$cfrom :: forall x. ModuleName -&gt; Rep ModuleName x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679648137"><span id="local-6989586621679648141"><span id="local-6989586621679648145"><span id="local-6989586621679648149"><span id="local-6989586621679648153"><span id="local-6989586621679648157"><span id="local-6989586621679648162"><span class="annot"><span class="annottext">Eq ModuleName
Eq ModuleName
-&gt; (ModuleName -&gt; ModuleName -&gt; Ordering)
-&gt; (ModuleName -&gt; ModuleName -&gt; Bool)
-&gt; (ModuleName -&gt; ModuleName -&gt; Bool)
-&gt; (ModuleName -&gt; ModuleName -&gt; Bool)
-&gt; (ModuleName -&gt; ModuleName -&gt; Bool)
-&gt; (ModuleName -&gt; ModuleName -&gt; ModuleName)
-&gt; (ModuleName -&gt; ModuleName -&gt; ModuleName)
-&gt; Ord ModuleName
ModuleName -&gt; ModuleName -&gt; Bool
ModuleName -&gt; ModuleName -&gt; Ordering
ModuleName -&gt; ModuleName -&gt; ModuleName
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: ModuleName -&gt; ModuleName -&gt; ModuleName
$cmin :: ModuleName -&gt; ModuleName -&gt; ModuleName
max :: ModuleName -&gt; ModuleName -&gt; ModuleName
$cmax :: ModuleName -&gt; ModuleName -&gt; ModuleName
&gt;= :: ModuleName -&gt; ModuleName -&gt; Bool
$c&gt;= :: ModuleName -&gt; ModuleName -&gt; Bool
&gt; :: ModuleName -&gt; ModuleName -&gt; Bool
$c&gt; :: ModuleName -&gt; ModuleName -&gt; Bool
&lt;= :: ModuleName -&gt; ModuleName -&gt; Bool
$c&lt;= :: ModuleName -&gt; ModuleName -&gt; Bool
&lt; :: ModuleName -&gt; ModuleName -&gt; Bool
$c&lt; :: ModuleName -&gt; ModuleName -&gt; Bool
compare :: ModuleName -&gt; ModuleName -&gt; Ordering
$ccompare :: ModuleName -&gt; ModuleName -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679648118"><span id="local-6989586621679648126"><span id="local-6989586621679648129"><span id="local-6989586621679648131"><span class="annot"><span class="annottext">ReadPrec [ModuleName]
ReadPrec ModuleName
Int -&gt; ReadS ModuleName
ReadS [ModuleName]
(Int -&gt; ReadS ModuleName)
-&gt; ReadS [ModuleName]
-&gt; ReadPrec ModuleName
-&gt; ReadPrec [ModuleName]
-&gt; Read ModuleName
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [ModuleName]
$creadListPrec :: ReadPrec [ModuleName]
readPrec :: ReadPrec ModuleName
$creadPrec :: ReadPrec ModuleName
readList :: ReadS [ModuleName]
$creadList :: ReadS [ModuleName]
readsPrec :: Int -&gt; ReadS ModuleName
$creadsPrec :: Int -&gt; ReadS ModuleName
</span><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679648106"><span id="local-6989586621679648108"><span id="local-6989586621679648114"><span class="annot"><span class="annottext">Int -&gt; ModuleName -&gt; ShowS
[ModuleName] -&gt; ShowS
ModuleName -&gt; String
(Int -&gt; ModuleName -&gt; ShowS)
-&gt; (ModuleName -&gt; String)
-&gt; ([ModuleName] -&gt; ShowS)
-&gt; Show ModuleName
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [ModuleName] -&gt; ShowS
$cshowList :: [ModuleName] -&gt; ShowS
show :: ModuleName -&gt; String
$cshow :: ModuleName -&gt; String
showsPrec :: Int -&gt; ModuleName -&gt; ShowS
$cshowsPrec :: Int -&gt; ModuleName -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679648072"><span id="local-6989586621679648074"><span id="local-6989586621679648076"><span id="local-6989586621679648078"><span id="local-6989586621679648080"><span id="local-6989586621679648082"><span id="local-6989586621679648084"><span id="local-6989586621679648086"><span id="local-6989586621679648088"><span id="local-6989586621679648090"><span id="local-6989586621679648092"><span id="local-6989586621679648094"><span id="local-6989586621679648097"><span id="local-6989586621679648101"><span class="annot"><span class="annottext">Typeable ModuleName
Typeable ModuleName
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; ModuleName -&gt; c ModuleName)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c ModuleName)
-&gt; (ModuleName -&gt; Constr)
-&gt; (ModuleName -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c ModuleName))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e))
    -&gt; Maybe (c ModuleName))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; ModuleName -&gt; ModuleName)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; ModuleName -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; ModuleName -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; ModuleName -&gt; [u])
-&gt; (forall u.
    Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; ModuleName -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName)
-&gt; Data ModuleName
ModuleName -&gt; DataType
ModuleName -&gt; Constr
(forall b. Data b =&gt; b -&gt; b) -&gt; ModuleName -&gt; ModuleName
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; ModuleName -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; ModuleName -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; ModuleName -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; ModuleName -&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c ModuleName
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; ModuleName -&gt; c ModuleName
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c ModuleName)
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c ModuleName)
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName
$cgmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName
$cgmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName
$cgmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; ModuleName -&gt; m ModuleName
gmapQi :: forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; ModuleName -&gt; u
$cgmapQi :: forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; ModuleName -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; ModuleName -&gt; [u]
$cgmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; ModuleName -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; ModuleName -&gt; r
$cgmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; ModuleName -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; ModuleName -&gt; r
$cgmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; ModuleName -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; ModuleName -&gt; ModuleName
$cgmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; ModuleName -&gt; ModuleName
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c ModuleName)
$cdataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c ModuleName)
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c ModuleName)
$cdataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c ModuleName)
dataTypeOf :: ModuleName -&gt; DataType
$cdataTypeOf :: ModuleName -&gt; DataType
toConstr :: ModuleName -&gt; Constr
$ctoConstr :: ModuleName -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c ModuleName
$cgunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c ModuleName
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; ModuleName -&gt; c ModuleName
$cgfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; ModuleName -&gt; c ModuleName
</span><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="annot"><a href="Distribution.ModuleName.html#unModuleName"><span class="hs-identifier hs-type">unModuleName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-45"></span><span id="unModuleName"><span class="annot"><span class="annottext">unModuleName :: ModuleName -&gt; String
</span><a href="Distribution.ModuleName.html#unModuleName"><span class="hs-identifier hs-var hs-var">unModuleName</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span id="local-6989586621679648069"><span class="annot"><span class="annottext">ShortText
</span><a href="#local-6989586621679648069"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShortText -&gt; String
</span><a href="Distribution.Utils.ShortText.html#fromShortText"><span class="hs-identifier hs-var">fromShortText</span></a></span><span> </span><span class="annot"><span class="annottext">ShortText
</span><a href="#local-6989586621679648069"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679648063"><span id="local-6989586621679648065"><span id="local-6989586621679648067"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span></span></span></span><span>
</span><span id="line-48"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679648056"><span id="local-6989586621679648058"><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span></span></span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#NFData"><span class="hs-identifier hs-type">NFData</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-51"></span><span>    </span><span id="local-6989586621679648049"><span class="annot"><span class="annottext">rnf :: ModuleName -&gt; ()
</span><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var hs-var hs-var hs-var">rnf</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span id="local-6989586621679648047"><span class="annot"><span class="annottext">ShortText
</span><a href="#local-6989586621679648047"><span class="hs-identifier hs-var">ms</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShortText -&gt; ()
forall a. NFData a =&gt; a -&gt; ()
</span><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var">rnf</span></a></span><span> </span><span class="annot"><span class="annottext">ShortText
</span><a href="#local-6989586621679648047"><span class="hs-identifier hs-var">ms</span></a></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679648044"><span class="annot"><a href="Distribution.Pretty.html#Pretty"><span class="hs-identifier hs-type">Pretty</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-54"></span><span>  </span><span id="local-6989586621679648042"><span class="annot"><span class="annottext">pretty :: ModuleName -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var hs-var hs-var hs-var">pretty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">Disp.text</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Doc) -&gt; (ModuleName -&gt; String) -&gt; ModuleName -&gt; Doc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="Distribution.ModuleName.html#unModuleName"><span class="hs-identifier hs-var">unModuleName</span></a></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#Parsec"><span class="hs-identifier hs-type">Parsec</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-57"></span><span>    </span><span id="local-6989586621679648033"><span class="annot"><span class="annottext">parsec :: forall (m :: * -&gt; *). CabalParsing m =&gt; m ModuleName
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var hs-var hs-var hs-var">parsec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m ModuleName
forall (m :: * -&gt; *). CabalParsing m =&gt; m ModuleName
</span><a href="Distribution.ModuleName.html#parsecModuleName"><span class="hs-identifier hs-var">parsecModuleName</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="annot"><a href="Distribution.ModuleName.html#parsecModuleName"><span class="hs-identifier hs-type">parsecModuleName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679648030"><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#CabalParsing"><span class="hs-identifier hs-type">CabalParsing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-60"></span><span id="parsecModuleName"><span class="annot"><span class="annottext">parsecModuleName :: forall (m :: * -&gt; *). CabalParsing m =&gt; m ModuleName
</span><a href="Distribution.ModuleName.html#parsecModuleName"><span class="hs-identifier hs-var hs-var">parsecModuleName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DList Char -&gt; m ModuleName
</span><a href="#local-6989586621679648010"><span class="hs-identifier hs-var">state0</span></a></span><span> </span><span class="annot"><span class="annottext">DList Char
forall a. DList a
</span><a href="Distribution.Compat.DList.html#empty"><span class="hs-identifier hs-var">DList.empty</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-61"></span><span>    </span><span class="annot"><a href="#local-6989586621679648008"><span class="hs-identifier hs-type">upper</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span>
</span><span id="line-62"></span><span>    </span><span class="hs-glyph">!</span><span id="local-6989586621679648008"><span class="annot"><span class="annottext">upper :: m Char
</span><a href="#local-6989586621679648008"><span class="hs-identifier hs-var hs-var">upper</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; m Char
forall (m :: * -&gt; *). CharParsing m =&gt; (Char -&gt; Bool) -&gt; m Char
</span><a href="Distribution.Compat.CharParsing.html#satisfy"><span class="hs-identifier hs-var">P.satisfy</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isUpper"><span class="hs-identifier hs-var">isUpper</span></a></span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span>    </span><span class="annot"><a href="#local-6989586621679648005"><span class="hs-identifier hs-type">ch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span>
</span><span id="line-65"></span><span>    </span><span class="hs-glyph">!</span><span id="local-6989586621679648005"><span class="annot"><span class="annottext">ch :: m Char
</span><a href="#local-6989586621679648005"><span class="hs-identifier hs-var hs-var">ch</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; m Char
forall (m :: * -&gt; *). CharParsing m =&gt; (Char -&gt; Bool) -&gt; m Char
</span><a href="Distribution.Compat.CharParsing.html#satisfy"><span class="hs-identifier hs-var">P.satisfy</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679648004"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679648004"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="Distribution.ModuleName.html#validModuleChar"><span class="hs-identifier hs-var">validModuleChar</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679648004"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679648004"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="hs-special">)</span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span>    </span><span class="annot"><a href="#local-6989586621679648001"><span class="hs-identifier hs-type">alt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-68"></span><span>    </span><span class="hs-glyph">!</span><span id="local-6989586621679648001"><span class="annot"><span class="annottext">alt :: m ModuleName -&gt; m ModuleName -&gt; m ModuleName
</span><a href="#local-6989586621679648001"><span class="hs-identifier hs-var hs-var">alt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m ModuleName -&gt; m ModuleName -&gt; m ModuleName
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">(&lt;|&gt;)</span></a></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span>    </span><span class="annot"><a href="#local-6989586621679648010"><span class="hs-identifier hs-type">state0</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList.DList</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-71"></span><span>    </span><span id="local-6989586621679648010"><span class="annot"><span class="annottext">state0 :: DList Char -&gt; m ModuleName
</span><a href="#local-6989586621679648010"><span class="hs-identifier hs-var hs-var">state0</span></a></span></span><span> </span><span id="local-6989586621679647999"><span class="annot"><span class="annottext">DList Char
</span><a href="#local-6989586621679647999"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-72"></span><span>        </span><span id="local-6989586621679647998"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647998"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m Char
</span><a href="#local-6989586621679648008"><span class="hs-identifier hs-var">upper</span></a></span><span>
</span><span id="line-73"></span><span>        </span><span class="annot"><span class="annottext">DList Char -&gt; m ModuleName
</span><a href="#local-6989586621679647997"><span class="hs-identifier hs-var">state1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DList Char -&gt; Char -&gt; DList Char
forall a. DList a -&gt; a -&gt; DList a
</span><a href="Distribution.Compat.DList.html#snoc"><span class="hs-identifier hs-var">DList.snoc</span></a></span><span> </span><span class="annot"><span class="annottext">DList Char
</span><a href="#local-6989586621679647999"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647998"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span>    </span><span class="annot"><a href="#local-6989586621679647997"><span class="hs-identifier hs-type">state1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList.DList</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-76"></span><span>    </span><span id="local-6989586621679647997"><span class="annot"><span class="annottext">state1 :: DList Char -&gt; m ModuleName
</span><a href="#local-6989586621679647997"><span class="hs-identifier hs-var hs-var">state1</span></a></span></span><span> </span><span id="local-6989586621679647995"><span class="annot"><span class="annottext">DList Char
</span><a href="#local-6989586621679647995"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DList Char -&gt; m ModuleName
</span><a href="#local-6989586621679647994"><span class="hs-identifier hs-var">state1'</span></a></span><span> </span><span class="annot"><span class="annottext">DList Char
</span><a href="#local-6989586621679647995"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">m ModuleName -&gt; m ModuleName -&gt; m ModuleName
</span><a href="#local-6989586621679648001"><span class="hs-operator hs-var">`alt`</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; m ModuleName
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ModuleName
forall a. IsString a =&gt; String -&gt; a
</span><a href="../../base/src/Data.String.html#fromString"><span class="hs-identifier hs-var">fromString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DList Char -&gt; String
forall a. DList a -&gt; [a]
</span><a href="Distribution.Compat.DList.html#toList"><span class="hs-identifier hs-var">DList.toList</span></a></span><span> </span><span class="annot"><span class="annottext">DList Char
</span><a href="#local-6989586621679647995"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span>    </span><span class="annot"><a href="#local-6989586621679647994"><span class="hs-identifier hs-type">state1'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList.DList</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679648030"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-79"></span><span>    </span><span id="local-6989586621679647994"><span class="annot"><span class="annottext">state1' :: DList Char -&gt; m ModuleName
</span><a href="#local-6989586621679647994"><span class="hs-identifier hs-var hs-var">state1'</span></a></span></span><span> </span><span id="local-6989586621679647992"><span class="annot"><span class="annottext">DList Char
</span><a href="#local-6989586621679647992"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-80"></span><span>        </span><span id="local-6989586621679647991"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647991"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m Char
</span><a href="#local-6989586621679648005"><span class="hs-identifier hs-var">ch</span></a></span><span>
</span><span id="line-81"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647991"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-82"></span><span>            </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DList Char -&gt; m ModuleName
</span><a href="#local-6989586621679648010"><span class="hs-identifier hs-var">state0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DList Char -&gt; Char -&gt; DList Char
forall a. DList a -&gt; a -&gt; DList a
</span><a href="Distribution.Compat.DList.html#snoc"><span class="hs-identifier hs-var">DList.snoc</span></a></span><span> </span><span class="annot"><span class="annottext">DList Char
</span><a href="#local-6989586621679647992"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647991"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-83"></span><span>            </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DList Char -&gt; m ModuleName
</span><a href="#local-6989586621679647997"><span class="hs-identifier hs-var">state1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DList Char -&gt; Char -&gt; DList Char
forall a. DList a -&gt; a -&gt; DList a
</span><a href="Distribution.Compat.DList.html#snoc"><span class="hs-identifier hs-var">DList.snoc</span></a></span><span> </span><span class="annot"><span class="annottext">DList Char
</span><a href="#local-6989586621679647992"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647991"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="annot"><a href="Distribution.ModuleName.html#validModuleChar"><span class="hs-identifier hs-type">validModuleChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-86"></span><span id="validModuleChar"><span class="annot"><span class="annottext">validModuleChar :: Char -&gt; Bool
</span><a href="Distribution.ModuleName.html#validModuleChar"><span class="hs-identifier hs-var hs-var">validModuleChar</span></a></span></span><span> </span><span id="local-6989586621679647990"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647990"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isAlphaNum"><span class="hs-identifier hs-var">isAlphaNum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647990"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647990"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'_'</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647990"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="annot"><a href="Distribution.ModuleName.html#validModuleComponent"><span class="hs-identifier hs-type">validModuleComponent</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-89"></span><span id="validModuleComponent"><span class="annot"><span class="annottext">validModuleComponent :: String -&gt; Bool
</span><a href="Distribution.ModuleName.html#validModuleComponent"><span class="hs-identifier hs-var hs-var">validModuleComponent</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-90"></span><span class="annot"><a href="Distribution.ModuleName.html#validModuleComponent"><span class="hs-identifier hs-var">validModuleComponent</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679647988"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647988"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679647987"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679647987"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isUpper"><span class="hs-identifier hs-var">isUpper</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647988"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="Distribution.ModuleName.html#validModuleChar"><span class="hs-identifier hs-var">validModuleChar</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679647987"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-comment">-- | Construct a 'ModuleName' from a valid module name 'String'.</span><span>
</span><span id="line-93"></span><span class="hs-comment">--</span><span>
</span><span id="line-94"></span><span class="hs-comment">-- This is just a convenience function intended for valid module strings. It is</span><span>
</span><span id="line-95"></span><span class="hs-comment">-- an error if it is used with a string that is not a valid module name. If you</span><span>
</span><span id="line-96"></span><span class="hs-comment">-- are parsing user input then use 'Distribution.Text.simpleParse' instead.</span><span>
</span><span id="line-97"></span><span class="hs-comment">--</span><span>
</span><span id="line-98"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/Data.String.html#IsString"><span class="hs-identifier hs-type">IsString</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-99"></span><span>    </span><span id="local-6989586621679647982"><span class="annot"><span class="annottext">fromString :: String -&gt; ModuleName
</span><a href="../../base/src/Data.String.html#fromString"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromString</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShortText -&gt; ModuleName
</span><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-var">ModuleName</span></a></span><span> </span><span class="annot"><span class="annottext">(ShortText -&gt; ModuleName)
-&gt; (String -&gt; ShortText) -&gt; String -&gt; ModuleName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShortText
</span><a href="Distribution.Utils.ShortText.html#toShortText"><span class="hs-identifier hs-var">toShortText</span></a></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="hs-comment">-- | Construct a 'ModuleName' from valid module components, i.e. parts</span><span>
</span><span id="line-102"></span><span class="hs-comment">-- separated by dots.</span><span>
</span><span id="line-103"></span><span class="annot"><a href="Distribution.ModuleName.html#fromComponents"><span class="hs-identifier hs-type">fromComponents</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-104"></span><span id="fromComponents"><span class="annot"><span class="annottext">fromComponents :: [String] -&gt; ModuleName
</span><a href="Distribution.ModuleName.html#fromComponents"><span class="hs-identifier hs-var hs-var">fromComponents</span></a></span></span><span> </span><span id="local-6989586621679647981"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679647981"><span class="hs-identifier hs-var">comps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ModuleName
forall a. IsString a =&gt; String -&gt; a
</span><a href="../../base/src/Data.String.html#fromString"><span class="hs-identifier hs-var">fromString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.&quot;</span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679647981"><span class="hs-identifier hs-var">comps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-105"></span><span class="hs-pragma">{-# DEPRECATED</span><span> </span><span class="hs-pragma">fromComponents</span><span> </span><span class="hs-pragma">&quot;Exists for cabal-install only&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span class="hs-comment">-- | The module name @Main@.</span><span>
</span><span id="line-108"></span><span class="hs-comment">--</span><span>
</span><span id="line-109"></span><span class="annot"><a href="Distribution.ModuleName.html#main"><span class="hs-identifier hs-type">main</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-110"></span><span id="main"><span class="annot"><span class="annottext">main :: ModuleName
</span><a href="Distribution.ModuleName.html#main"><span class="hs-identifier hs-var hs-var">main</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShortText -&gt; ModuleName
</span><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-var">ModuleName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ShortText
forall a. IsString a =&gt; String -&gt; a
</span><a href="../../base/src/Data.String.html#fromString"><span class="hs-identifier hs-var">fromString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Main&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="hs-comment">-- | The individual components of a hierarchical module name. For example</span><span>
</span><span id="line-113"></span><span class="hs-comment">--</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- &gt; components (fromString &quot;A.B.C&quot;) = [&quot;A&quot;, &quot;B&quot;, &quot;C&quot;]</span><span>
</span><span id="line-115"></span><span class="hs-comment">--</span><span>
</span><span id="line-116"></span><span class="annot"><a href="Distribution.ModuleName.html#components"><span class="hs-identifier hs-type">components</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-117"></span><span id="components"><span class="annot"><span class="annottext">components :: ModuleName -&gt; [String]
</span><a href="Distribution.ModuleName.html#components"><span class="hs-identifier hs-var hs-var">components</span></a></span></span><span> </span><span id="local-6989586621679647979"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679647979"><span class="hs-identifier hs-var">mn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="#local-6989586621679647978"><span class="hs-identifier hs-var">split</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="Distribution.ModuleName.html#unModuleName"><span class="hs-identifier hs-var">unModuleName</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679647979"><span class="hs-identifier hs-var">mn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-119"></span><span>    </span><span id="local-6989586621679647978"><span class="annot"><span class="annottext">split :: String -&gt; [String]
</span><a href="#local-6989586621679647978"><span class="hs-identifier hs-var hs-var">split</span></a></span></span><span> </span><span id="local-6989586621679647976"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679647976"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679647976"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-120"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679647974"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679647974"><span class="hs-identifier hs-var">chunk</span></a></span></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679647974"><span class="hs-identifier hs-var">chunk</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-121"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621679647973"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679647973"><span class="hs-identifier hs-var">chunk</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679647972"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679647972"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679647973"><span class="hs-identifier hs-var">chunk</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="#local-6989586621679647978"><span class="hs-identifier hs-var">split</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679647972"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-comment">-- | Convert a module name to a file path, but without any file extension.</span><span>
</span><span id="line-124"></span><span class="hs-comment">-- For example:</span><span>
</span><span id="line-125"></span><span class="hs-comment">--</span><span>
</span><span id="line-126"></span><span class="hs-comment">-- &gt; toFilePath (fromString &quot;A.B.C&quot;) = &quot;A/B/C&quot;</span><span>
</span><span id="line-127"></span><span class="hs-comment">--</span><span>
</span><span id="line-128"></span><span class="annot"><a href="Distribution.ModuleName.html#toFilePath"><span class="hs-identifier hs-type">toFilePath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-129"></span><span id="toFilePath"><span class="annot"><span class="annottext">toFilePath :: ModuleName -&gt; String
</span><a href="Distribution.ModuleName.html#toFilePath"><span class="hs-identifier hs-var hs-var">toFilePath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Char) -&gt; ShowS
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char
</span><a href="#local-6989586621679647970"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; (ModuleName -&gt; String) -&gt; ModuleName -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="Distribution.ModuleName.html#unModuleName"><span class="hs-identifier hs-var">unModuleName</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-130"></span><span>    </span><span id="local-6989586621679647970"><span class="annot"><span class="annottext">f :: Char -&gt; Char
</span><a href="#local-6989586621679647970"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="../../filepath/src/System.FilePath.Windows.html#pathSeparator"><span class="hs-identifier hs-var">pathSeparator</span></a></span><span>
</span><span id="line-131"></span><span>    </span><span class="annot"><a href="#local-6989586621679647970"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span id="local-6989586621679647969"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647969"><span class="hs-identifier hs-var">c</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679647969"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-132"></span></pre></body></html>